<!DOCTYPE html>
<html lang="zh-hans">
<head profile="http://www.w3.org/1999/xhtml/vocab">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>{Content.Title} | {Stl.SiteName}</title>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <script type="text/javascript">
    NAV_DATA =[{"mlid":"1558","plid":"687","hidden":"0","language":"zh-hans","link_title":"\u9038\u592b\u4e66\u9662","link_path":"\/zh-hans\/college\/shaw\/index","has_children":"0"}]
  </script>
  <script src="{Stl.SiteUrl}/js/jquery.min.js"></script>
  <script type="text/javascript" src="{Stl.SiteUrl}/js/menu_min.js"></script>
  <link type="text/css" rel="stylesheet" href="{Stl.SiteUrl}/css/css_xE-rWrJf-fncB6ztZfd2huxqgxu4WO-qwma6Xer30m4.css" media="all" />
  <link type="text/css" rel="stylesheet" href="{Stl.SiteUrl}/css/css_S26w7qpNpPD50KMaZPYzlzdTHTzwl1WEmzVwHslBKxM.css" media="all" />
  <link type="text/css" rel="stylesheet" href="{Stl.SiteUrl}/css/css_Wu8npAzy16WmnnnWKxpexfgsAryolGGaX6yO3GWA5bU.css" media="all" />
  <link type="text/css" rel="stylesheet" href="{Stl.SiteUrl}/css/css_Ckld0rpYM-QiW7YRqJe7_JYuBG8yDc_75eh3MJ4ZYF0.css" media="all" />
  <link type="text/css" rel="stylesheet" href="{Stl.SiteUrl}/css/css_PDz7KyCt6Wei-gTfZS2GyFhzKRQ6kFwSM3v7PALW-SY.css" media="all" />
  <link type="text/css" rel="stylesheet" href="{Stl.SiteUrl}/css/justify.css" media="all">
  <style type="text/css">
    .vjs-default-skin{
      width: 100%;
      height: auto;
    }
  </style>
</head>
<body class="html  not-front not-logged-in no-sidebars page-node page-node- page-node-3410  node-type-cuhk-content-type-news domain-www-cuhk-edu-cn i18n-zh-hans  theme-name-cuhk">
<stl:include file="/include/header.html"></stl:include>

<div class="cuhksz-content-main">
      <div class="cuhksz-path">
      <div class="container">
        <ol id="breadcrumb" class="breadcrumb">
          <li><stl:a topLevel="1">{Channel.Title}</stl:a></li>
          <li><stl:a topLevel="2"></stl:a></li>
          <li class="active"><stl:a class="active">{Content.Title}</stl:a></li>
        </ol>
                        
      </div>
    </div>
  
  <div class="cuhksz-detail">
            <div class="cuhksz-detail-social-media">
    <ul>
        <!--<li class="cuhksz-weibo"><a href="http://t.qq.com/siteserver2011">weibo</a></li>
        <li class="cuhksz-weixin"><a href="{stl.siteurl}/utils/weichat.html">Weixin</a></li>
        <li class="cuhksz-print"><a href="">print</a></li>-->
        <li class="cuhksz-back"><a href="#cuhksz-top">back</a></li>
    </ul>
</div>
        <div class="cuhksz-detail-content">
      <h1>{Content.Title}</h1>
                        <ul class="cuhksz-detail-author">
                        <li>
              <stl:content type="AddDate" formatString="yyyy.MM.dd"></stl:content>            </li>
            <li>{Channel.Title}</li>
          </ul>
        
                  <div class="cuhksz-detail-info"><div class="field field-name-field-common-summary field-type-text-long field-label-hidden"><div class="field-items"><div class="field-item even">{Content.Summary}</div></div></div></div>
                      
      <div class="cuhksz-detail-word">
                <div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even">
                
                <stl:video isAutoPlay="false" playUrl="{Content.VideoUrl}" ImageUrl=""/>
</div></div></div>      </div>

              <p class="clearfix"></p>
      </div>
  </div>
</div>

<stl:include file="/include/footer.html"></stl:include>
<div id="cuhksz-goback"></div>
<script type="text/javascript" src="{Stl.SiteUrl}/js/js_gPM6NXOQjN2XM2JWQGfy07nKmcdDFrL289YA7h80ySs.js"></script>
<script type="text/javascript" src="{Stl.SiteUrl}/js/js_ch6Wy6yIsiAP7y8oHc_B4PjGBr9MP9YQ7URC95L1aDk.js"></script>
<script type="text/javascript" src="{Stl.SiteUrl}/js/js_n43V15XtpRifZwRrhZe09_4ENcwLd39qwiyaT5vJDgs.js"></script>

<script type="text/javascript">
    var myVideo = document.getElementsByTagName('video')[0];

    /**
    var vBreakPoint = {
      video_id: 399,
      time: 0
    }*/

    var current = 0;

    console.log('视频可以播放');
    /*setCookie("xwsqxy", JSON.stringify(vBreakPoint));*/
    var break_piont = JSON.parse(getCookie("xwsqxy")).time;
    console.log(break_piont);
    if(break_piont > 0){
      myVideo.currentTime = break_piont;
    }
    myVideo.play();

    
    myVideo.addEventListener("canplay", function() {
    });

    myVideo.addEventListener("timeupdate", function(){
      if(parseInt(myVideo.currentTime) > current){
        current = parseInt(myVideo.currentTime);//获取当前播放时间
        if(current%30 === 0){
          console.log(myVideo.currentTime);//在调试器中打印
          vBreakPoint = JSON.parse(getCookie("xwsqxy"));
          vBreakPoint.time = myVideo.currentTime;
          setCookie("xwsqxy", JSON.stringify(vBreakPoint));
          break_piont = JSON.parse(getCookie("xwsqxy")).time;
          console.log("cookie_breakpiont:" + break_piont);
        }
      }
    });

    myVideo.addEventListener("ended", function(){
      console.log("end");
      vBreakPoint = JSON.parse(getCookie("xwsqxy"));
      vBreakPoint.time = 0;
      setCookie("xwsqxy", JSON.stringify(vBreakPoint));
    });

    function setCookie(name,value)
    {
      var Days = 30;
      var exp = new Date();
      exp.setTime(exp.getTime() + Days*24*60*60*1000);
      document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
    }


    function getCookie(name)
    {
      var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
      if(arr=document.cookie.match(reg))
        return unescape(arr[2]);
      else
        return null;
    }

    function delCookie(name)
    {
      var exp = new Date();
      exp.setTime(exp.getTime() - 1);
      var cval=getCookie(name);
      if(cval!=null)
      document.cookie= name + "="+cval+";expires="+exp.toGMTString();
    }
  </script>
</body>
</html>
